<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>商品管理</title>
    <script src="__INDEX__/store/js/mui.min.js"></script>
	<link href="__INDEX__/store/css/mui.min.css" rel="stylesheet" />
	<link rel="stylesheet" href="__INDEX__/store/css/style.css" />
	<link rel="stylesheet" href="__INDEX__/store/css/iconfont.css" />
	<link rel="stylesheet" href="__INDEX__/store/css/sjhout.css" />
    <script type="text/javascript" charset="utf-8">
      	mui.init();
    </script>
</head>
<style>
	.goods_state{
		font-size: 14px;
    	color: red;
	}
	    
</style>
<body>
	<header class="mui-bar mui-bar-nav">
	    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	    <h1 class="mui-title">商品管理</h1>
	    <a class="mui-pull-right add" href="{:url('agent/goods_add')}">添加</a>
	</header>
	<div class="mui-content recharge_content">
		{if count($goods_list)>0}
		<ul class="shop_list">
			{volist name="$goods_list" id="ad" empty=""}
			<li><a href='goods_edit.html?goods_id={$ad.id}'>
				<div class='shop_info clearfix'>
					<div  style="float: left;width: 43px;"><img src="{$ad.thumb}"></div>
					<div style="float: left;width: 65%;" class='shop_nam'>{$ad.goods_name}</div>
					<div style="text-align: right;width: unset;float: right;" class='shop_nam'>
						<!--<div style="font-size: 16px;"><a href="javascript:;goods_state({$ad.id},2)" style="color: #71ea69;">上架</a></div>
						<div style="font-size: 16px;"><a href="javascript:;goods_state({$ad.id},1)" style="color: #e33939;">下架</a></div>-->
					</div>
					
				</div>
				<div class='shop_fw clearfix'>
					<!--<div class='left'>零售价：{$ad.sale_price}送{$ad.zs_price}</div>-->
					<div class='left'>会员价：{$ad.sale_price - $ad.dk_price}+{$ad.dk_price}</div>
				</div>
			</a></li>
			{/volist}
		</ul>
		{else/}
		<li class="clearfix" style="width:300px;height:200px;position:absolute;left:50%;top:50%;margin:-100px 0 0 -150px ">
			<div style="width:100%;text-align: center;"><img style="width: 120px;height: 120px;margin: 0 auto;" src="__PUBLIC__/static/index/images/none.png"/></div>
			<div style="width:100%;text-align: center;">没有上架商品</div>
		</li>
		{/if}
	</div>
</body>
</html>
<script type="text/javascript" src="__INDEX__/store/js/jquery.min.js"></script>
<script type="text/javascript" src="__INDEX__/store/js/castapp.js"></script>
<script type="text/javascript" src="__INDEX__/store/js/layer/layer.min.js"></script>
<script type="text/javascript" src="__INDEX__/store/js/picker.js"></script>
<script type="text/javascript" src="__INDEX__/store/js/city.data-3.js"></script>
<script type="text/javascript" src="__INDEX__/store/js/bootstrap.min.js"></script>
<script>
	function goods_state(goods_id,state){
		layer.confirm('确定修改？', {
		  btn: ['确定','取消'] //按钮
		}, function(){
		  $.ajax({
				url: "{:url('agent/godos_state')}",
				data: {
					goods_id	:goods_id,
					type		:state
				},
				success: function(data) {
					layer.msg(data.msg, {
										time: 2000
								}, function(){
					    			location.href="{:url('agent/goods_list')}";
							});
				}
			});
			layer.close();
		});
	}
</script>